/**
 * 
 */
package neptune.manager.validator.core;

import neptune.manager.model.topology.Link;
import neptune.manager.utils.Logger.MessageType;
import neptune.manager.validator.Validator;
import neptune.manager.validator.ValidatorResult;
import neptune.manager.validator.rules.link.EndPointNamesDefinitionRule;

/**
 * @author Roberto Bifulco [RobertoBifulco.it] [info@robertoBifulco.it]
 * 
 */
public class CoreLinkValidator extends Validator<Link> {

	public CoreLinkValidator() {
		addRule(new EndPointNamesDefinitionRule());
	}

	@Override
	public String getName() {
		return "CoreLinkValidator";
	}

	@Override
	protected ValidatorResult validationAlgorithm(Link toValidate,
			ValidatorResult result) {

		result.getLog().addMessage(
				"Validating link '" + toValidate.getId() + "'",
				MessageType.NORMAL);

		return result;
	}

}
